github.com/krum110487/go-htaccess@v0.0.0-20240316004156-60641c8e7598/Flag Notes.txt (about) 1 The following document is reference for all keywords which have flags we need to parse. 2 3 https://httpd.apache.org/docs/2.4/mod/mod_proxy_fcgi.html 4 <Proxy ...> 5 6 Simple Flags 7 https://httpd.apache.org/docs/2.4/mod/mod_proxy.html 8 ProxyPass [path] !|url [key=value [key=value ...]] [nocanon] [interpolate] [noquery] 9 ProxyPassMatch [regex] !|url [key=value [key=value ...]] 10 ProxySet url key=value [key=value ...] 11 12 https://httpd.apache.org/docs/2.4/mod/mod_proxy_balancer.html 13 BalancerMember [balancerurl] url [key=value [key=value ...]] 14 BalancerMember "ajp://1.2.3.4:8009" 15 BalancerMember "ajp://1.2.3.6:8009" loadfactor=5 16 BalancerMember ajp://1.2.3.6:8009 status=+R 17 BalancerMember "ajp://1.2.3.5:8009" loadfactor=2.25 18 BalancerMember "http://www2.example.com:8080" loadfactor=1 19 20 https://httpd.apache.org/docs/2.4/mod/mod_proxy_html.html 21 ProxyHTMLURLMap from-pattern to-pattern [flags] [cond] 22 ProxyHTMLURLMap http://www.example.com:8087 /translate/ 23 ProxyHTMLURLMap http://www.example.com:8077 /translate/ 24 ProxyHTMLURLMap / /translate/ 25 ProxyHTMLURLMap /translate/ /translate/ 26 ProxyHTMLURLMap / /translate/ h "${VAR}==value" 27 28 https://httpd.apache.org/docs/2.4/mod/mod_reqtimeout.html 29 RequestReadTimeout [handshake=timeout[-maxtimeout][,MinRate=rate] [header=timeout[-maxtimeout][,MinRate=rate] [body=timeout[-maxtimeout][,MinRate=rate] 30 RequestReadTimeout handshake=5 header=10 body=30 31 RequestReadTimeout body=10,MinRate=1000 32 RequestReadTimeout header=10-30,MinRate=500 33 RequestReadTimeout header=20-40,MinRate=500 body=20,MinRate=500 34 RequestReadTimeout stage=10 35 RequestReadTimeout handshake=0 header=0 body=0 36 RequestReadTimeout stage=timeout,MinRate=data_rate 37 RequestReadTimeout stage=timeout-maxtimeout,MinRate=data_rate 38 39 40 41 https://httpd.apache.org/docs/2.4/mod/mod_session_cookie.html 42 SessionCookieName name attributes 43 SessionCookieName session path=/private;domain=example.com;httponly;secure;version=1; 44 45 SessionCookieName2 name attributes 46 SessionCookieName2 session path=/private;domain=example.com;httponly;secure;version=1; 47 48 49 https://httpd.apache.org/docs/2.4/mod/mod_session_crypto.html 50 SessionCryptoDriver name [param[=value]] 51 SessionCryptoDriver nss 52 SessionCryptoDriver nss dir=certs 53 SessionCryptoDriver nss dir=certs key3=key3.db cert7=cert7.db secmod=secmod 54 SessionCryptoDriver nss "dir=My Certs" key3=key3.db cert7=cert7.db secmod=secmod 55 SessionCryptoDriver nss noinit 56 SessionCryptoDriver openssl engine=name 57 58 59 Different type! 60 https://httpd.apache.org/docs/2.4/mod/mod_session_dbd.html 61 SessionDBDCookieName name attributes 62 SessionDBDCookieName session path=/private;domain=example.com;httponly;secure;version=1; 63 SessionDBDCookieName session path=/ 64 65 SessionDBDCookieName2 name attributes 66 SessionDBDCookieName2 session path=/private;domain=example.com;httponly;secure;version=1; 67 68 69 https://httpd.apache.org/docs/2.4/mod/mod_setenvif.html 70 BrowserMatch regex [!]env-variable[=value] [[!]env-variable[=value]] ... 71 BrowserMatch ^Mozilla netscape 72 BrowserMatch MSIE !netscape 73 BrowserMatch Robot is_a_robot 74 BrowserMatch ^Mozilla forms jpeg=yes browser=netscape 75 BrowserMatch "^Mozilla/[2-3]" tables agif frames javascript 76 BrowserMatch MSIE !javascript 77 78 BrowserMatchNoCase regex [!]env-variable[=value] [[!]env-variable[=value]] ... 79 BrowserMatchNoCase mac platform=macintosh 80 BrowserMatchNoCase win platform=windows 81 82 SetEnvIf attribute regex [!]env-variable[=value] [[!]env-variable[=value]] ... 83 SetEnvIf Request_URI "\.gif$" object_is_image=gif 84 SetEnvIf Request_URI "\.jpg$" object_is_image=jpg 85 SetEnvIf Request_URI "\.xbm$" object_is_image=xbm 86 SetEnvIf Referer www\.mydomain\.example\.com intra_site_referral 87 SetEnvIf object_is_image xbm XBIT_PROCESSING=1 88 SetEnvIf Request_URI "\.(.*)$" EXTENSION=$1 89 SetEnvIf ^TS ^[a-z] HAVE_TS 90 91 SetEnvIfExpr expr [!]env-variable[=value] [[!]env-variable[=value]] ... 92 SetEnvIfExpr "tolower(req('X-Sendfile')) == 'd:\images\very_big.iso')" iso_delivered 93 SetEnvIfExpr "-R '10.0.0.0/8' || -R '172.16.0.0/12' || -R '192.168.0.0/16'" rfc1918 94 95 SetEnvIfNoCase attribute regex [!]env-variable[=value] [[!]env-variable[=value]] ... 96 SetEnvIfNoCase User-Agent Robot is_a_robot 97 SetEnvIfNoCase Host Example\.Org site=example 98 99 https://httpd.apache.org/docs/2.4/mod/mod_ssl.html 100 SSLCARevocationCheck chain|leaf|none [flags ...] 101 SSLCARevocationCheck chain no_crl_for_cert_ok 102 SSLCARevocationCheck leaf no_crl_for_cert_ok 103 SSLCARevocationCheck chain 104 SSLCARevocationCheck none 105 106 https://httpd.apache.org/docs/2.4/mod/mod_log_debug.html 107 LogMessage message [hook=hook] [expr=expression] 108 LogMessage "/foo/ has been requested" 109 LogMessage "subrequest to /foo/" hook=type_checker "expr=-T %{IS_SUBREQ}" 110 LogMessage "IPv6 timeout from %{REMOTE_ADDR}" "expr=-T %{IPV6} && %{REQUEST_STATUS} = 408" 111 LogMessage "%{reqenv:X-Foo}" hook=all 112 113 114 https://httpd.apache.org/docs/2.4/mod/mod_log_config.html 115 GlobalLog file|pipe format|nickname [env=[!]environment-variable| expr=expression] 116 CustomLog file|pipe format|nickname [env=[!]environment-variable| expr=expression] 117 CustomLog "logs/access_log" "%h %l %u %t \"%r\" %>s %b" 118 CustomLog "gif-requests.log" common env=gif-image 119 CustomLog "nongif-requests.log" common env=!gif-image 120 CustomLog "referer.log" referer env=!localreferer 121 122 https://httpd.apache.org/docs/2.4/mod/mod_filter.html 123 FilterProtocol filter-name [provider-name] proto-flags 124 FilterProtocol COMPRESS change=yes;byteranges=no 125 FilterProtocol COMPRESS DEFLATE change=yes;byteranges=no 126 FilterProtocol downsample "change=yes" 127 128 https://httpd.apache.org/docs/2.4/mod/mod_dbd.html 129 DBDParams param1=value1[,param2=value2] 130 DBDParams host=localhost 131 DBDParams host=localhost,dbname=pony 132 DBDParams host=localhost,dbname=pony,user=shetland,pass=appaloosa 133 134 https://httpd.apache.org/docs/2.4/mod/mod_authn_core.html 135 AuthLDAPBindDN cn=youruser,o=ctx 136 AuthLDAPBindDN cn=yourotheruser,o=dev 137 138 https://httpd.apache.org/docs/2.4/mod/mod_access_compat.html#allow 139 Allow from all|host|env=[!]env-variable [host|env=[!]env-variable] ... 140 Allow from example.org 141 Allow from .net example.edu 142 Allow from 10.1.2.3 143 Allow from 10 172.20 192.168.2 144 Allow from 2001:db8::a00:20ff:fea7:ccea/10 145 Allow from env=let_me_in 146 147 Deny from all|host|env=[!]env-variable [host|env=[!]env-variable] ... 148 Deny from all 149 Deny from host 150 Deny from env=!var 151 Deny from all host 152 Deny from env=name1 env=!name2 env=name3 153 154 155 156 157 158 NEEDS ITS OWN THING... 159 160 https://httpd.apache.org/docs/2.4/mod/mod_rewrite.html 161 RewriteCond 162 RewriteRule 163 164 https://httpd.apache.org/docs/2.4/mod/mod_headers.html 165 Header 166 RequestHeader 167 168 https://httpd.apache.org/docs/2.4/mod/mod_authz_core.html#require 169 Require 170 171 https://httpd.apache.org/docs/2.4/mod/core.html#allowoverride 172 AllowOverride 173 174 https://httpd.apache.org/docs/2.4/mod/mod_ext_filter.html 175 ExtFilterDefine 176 ExtFilterOptions 177 178 Unrelated, it's own thing: 179 https://httpd.apache.org/docs/2.4/mod/mod_substitute.html 180 https://httpd.apache.org/docs/2.4/mod/mod_version.html 181 https://httpd.apache.org/docs/2.4/mod/mod_mime.html (AddType) 182 https://httpd.apache.org/docs/2.4/mod/mod_ldap.html (AuthLDAPURL) 183 https://httpd.apache.org/docs/2.4/mod/mod_http2.html (Header) 184 185 Test items 186 https://httpd.apache.org/docs/2.4/mod/mod_authnz_ldap.html 187 https://httpd.apache.org/docs/2.4/mod/mod_info.html 188 AddModuleInfo